<?php 
error_reporting(E_ALL);
session_start();
require_once('constants.php');
require_once('functions.php');
include('classes/mysqlClass.php');



#conect to shop database	
$shopObj = new mysqlClass();

if(isset($_POST['field_update'])){
	$params[$_POST['field_update']]=$_POST['value'];
	$params['id']=$_POST['company']; 
	$shopObj->update('user_shops',$params);

}
if(isset($_POST['delete_company'])){
	$params=array();
//	$params['product_id'] =$_POST['delete_company'];
//	$shopObj->delete('products_details',$params);
//	$shopObj->delete('products_comments',$params);
//	$shopObj->delete('products_questions',$params);
//	$shopObj->delete('product_articles',$params);
//	$shopObj->delete('products_ratings',$params);
//	$shopObj->delete('products_categories',$params);
//	$shopObj->delete('stocks',$params);
//	
//	$params=array('id'=>$_POST['delete_product']);
//	$shopObj->delete('products',$params);	
	
}

?>